"""
自定义登陆判定拓展视图类
"""

from django.http import JsonResponse
from django.contrib.auth.mixins import LoginRequiredMixin


class LoginRequiredJsonMixin(LoginRequiredMixin):
    def handle_no_permission(self):
        return JsonResponse({'code': 400, 'errmsg': '您未登陆'})